Component({
  properties: {
    checked: {
      type: [Boolean],
      default: false
    },
    disabled: {
      type: [Boolean],
      default: false
    },
    value: {
      type: [String, Number],
      default: ''
    },
    theme: {
      type: [String],
      default: '#fb5c9b'
    }
  },
  methods: {
    toggle () {
      if (this.data.disabled) {
        return
      }
      var myEventDetail = {
        checked: !this.data.checked,
        id: this.data.value
      } 
      this.triggerEvent('change', myEventDetail)
    }
  }
})